<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:68:"/www/wwwroot/xunda-college/application/atxunda/view/index/index.html";i:1704420365;s:69:"/www/wwwroot/xunda-college/application/atxunda/view/index/header.html";i:1700617178;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="renderer" content="webkit">
<title>后台管理系统</title>
<link rel="stylesheet" href="__PUBLIC__css/pintuer.css?v=1.0">
<link rel="stylesheet" href="__PUBLIC__admin/admin.css">
<link rel="stylesheet" href="__PUBLIC__layui/css/layui.css">
<script src="__PUBLIC__js/jquery.js"></script>
<script src="__PUBLIC__js/pintuer.js"></script>
<script src="__PUBLIC__js/cookie.js"></script>
<script src="__PUBLIC__layui/layui.js"></script>
</head>
<style type="text/css">
	.refresh{width: 20px;height: 20px;float: right;margin:10px 20px;display: block;}
</style>
</head>
<?php if(request()->controller() != 'Index'): ?><img src="__PUBLIC__images/refresh.png" class="refresh" title="刷新"><?php endif; ?>
<script type="text/javascript">
	$('.refresh').click(function(){layer.msg('刷新中……');window.location.reload();})
</script>
<script type="text/javascript">
	function openwinx(url,name,w,h) {
		if(!w) w=screen.width-4;
		if(!h) h=screen.height-95;
		window.open(url,name,"width=" + w + ",height=" + h + ",toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,status=no");
	}
</script>
<body style="background-color:#f2f9fd;">
	<div class="header bg-main">
		<div class="logo margin-big-left fadein-top">
			<h1><img src="__PUBLIC__/images/y.jpg" class="radius-circle rotate-hover" height="50" alt="" />后台管理中心</h1>
		</div>
		<div class="head-l">
			<a class="button button-little bg-green" href="/" target="_blank"><span class="icon-home"></span> 前台首页</a> &nbsp;&nbsp;
			<a class="button button-little bg-green" href="javascript:;" onclick="cacheclear()" onclick="if(confirm('确定清除?')==false)return false;"><span class="icon-trash-o"></span> 清除缓存</a>&nbsp;&nbsp; 
			<a class="button button-little bg-red" onclick="logout()" href="javascript:;"><span class="icon-power-off"></span> 退出登录</a> <?php if($admin['admin_id'] == 1): ?><font color="#fff" >用户数 <b><?php echo $count; ?></b></font>  &nbsp;&nbsp;&nbsp;<font color="#fff" >教程总数 <b><?php echo $course_count; ?></b></font><?php endif; ?>
		</div>
	</div>
	<div class="leftnav">
		<div class="leftnav-title"><strong><span class="icon-list"></span>菜单列表</strong></div>
		<?php foreach($data as $k=>$v): ?>
		<h2><span class="<?php if($k == 0): ?> icon-user <?php else: ?> icon-pencil-square-o <?php endif; ?>"></span><?php echo $v['privilege_name']; ?></h2>
		<ul <?php if($k == 0): ?> style="display:block" <?php endif; ?>>
			<?php if(is_array($v['son']) || $v['son'] instanceof \think\Collection): if( count($v['son'])==0 ) : echo "" ;else: foreach($v['son'] as $key=>$v1): ?>
			<li><a href="/atxunda/<?php echo $v1['controller_name']; ?>/<?php echo $v1['action_name']; ?>" target="right"><span class="icon-caret-right"></span><?php echo $v1['privilege_name']; ?></a></li>
			<?php endforeach; endif; else: echo "" ;endif; ?> 
		</ul> 
		<?php endforeach; ?>
	</div>
	<script type="text/javascript">
		$(function(){
			$(".leftnav h2").click(function(){
				$(this).next().slideToggle(200);	
				$(this).toggleClass("on"); 
			})
			$(".leftnav ul li a").click(function(){
				var Cts = $('.bread').html();
				if(Cts.indexOf($(this).text()) <= 0){
					$('#a_leader_txt').after('<li><a href="'+$(this).attr('href')+'" target="right" class="a_leader_txt">'+$(this).text()+'</a></li>');
				}
				$(".leftnav ul li a").removeClass("on");
				$(this).addClass("on");
			})
		});
		function logout() {
			if(window.confirm('您确定要退出吗？')) {
				top.location = "<?php echo url('login/logout'); ?>";
			}
		}
		function cacheclear() {
			var index = '';
			$.ajax({
				url:"<?php echo url('common/cacheclear'); ?>",
				beforeSend:function(obj)
				{
					index = layer.load();
				},
				success:function(obj)
				{
					layer.close(index);
					layer.msg('清除成功');
				},
			})
		}
	</script>
	<ul class="bread">
		<li><a href="<?php echo url('index/info'); ?>" target="right" class="icon-home"> 首页</a></li>
		<li><a href="##" id="a_leader_txt">网站信息</a></li>
		<li>
			<b>当前语言：</b><span style="color:red;">中文</span>
			&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;切换语言：<a href="##">中文</a> &nbsp;&nbsp;<a href="##">英文</a> 
		</li>
	</ul>
	<div class="admin">
		<iframe scrolling="auto" rameborder="0" src="<?php echo url('user/index'); ?>" name="right" width="100%" height="100%"></iframe>
	</div>
</body>
</html>